package chainOfResponsibility;

public class Client {

    //对于客户端 只与对象1 进行交互
    public static void main(String[] args) {
        Handler concreteHandlerOne = new ConcreteHandlerOne();
        Handler concreteHandlerTwo = new ConcreteHandlerTwo();
        concreteHandlerOne.setHandler(concreteHandlerTwo);

        concreteHandlerOne.handleRequest("one");
        concreteHandlerTwo.handleRequest("two");
        concreteHandlerOne.handleRequest("three");
    }
}
